<template>
<div>
  <el-table :data="list" max-height="500" @selection-change="handleSelectionChange" border>
    <el-table-column type="selection" fixed="left"></el-table-column>
    <!-- 索引 -->
    <el-table-column type="index" width="50" align="center" key="index" fixed="left"></el-table-column>
    <el-table-column
      label="建议执行组织"
      prop="bizOrgName"
      key="bizOrgId"
      show-overflow-tooltip
      align="center"
      width="120px"
    ></el-table-column>
    <el-table-column
      label="实际分配执行组织"
      prop="actualBizOrgName"
      key="actualBizOrgId"
      show-overflow-tooltip
      width="130px"
      align="center"
    ></el-table-column>
    <el-table-column
      label="作业类型"
      prop="operatingUnitName"
      key="operatingUnit"
      show-overflow-tooltip
      align="center"
    ></el-table-column>
    <el-table-column
      label="分单号"
      prop="officialOrderItemNo"
      key="officialOrderItemNo"
      width="120"
      show-overflow-tooltip
      align="center"
    ></el-table-column>
    <el-table-column
      label="意向/返单号"
      prop="returnOrderCode"
      show-overflow-tooltip
      width="120"
      align="center"
    ></el-table-column>
    <el-table-column
      label="行业产品类别"
      prop="categoryName"
      key="category"
      show-overflow-tooltip
      width="100px"
      align="center"
    ></el-table-column>
    <el-table-column
      label="客户产品名称"
      prop="mdProjectItem.prodNameCust"
      key="prodNameCust"
      width="100px"
      show-overflow-tooltip
      align="center"
    ></el-table-column>
    <el-table-column label="数量" prop="qty" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column label="FOB单价" prop="fobAmount" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column label="金额" prop="amount" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column label="拖柜时间" prop="towingTime" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column label="单位料" prop="singleProductMaterial" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column label="单位工" prop="singleProductLabor" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column
      label="订单类型"
      prop="officialOrderTypeName"
      key="officialOrderType"
      show-overflow-tooltip
      align="center"
    ></el-table-column>
    <el-table-column
      label="核价单号"
      prop="verifyReqItemNo"
      width="120px"
      show-overflow-tooltip
      align="center"
    ></el-table-column>
    <el-table-column label="报价单号" prop="quoteProdNo" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column
      label="定向单号"
      prop="proofOrderItemNo"
      width="120px"
      show-overflow-tooltip
      align="center"
    ></el-table-column>
    <el-table-column
      label="混装产品编码"
      prop="mixProdCode"
      width="120px"
      show-overflow-tooltip
      align="center"
    ></el-table-column>
    <el-table-column
      label="主项编码"
      prop="mdProjectItem.projectItemNo"
      key="projectItemNo"
      width="100px"
      show-overflow-tooltip
      align="center"
    ></el-table-column>
    <!-- <el-table-column label="产品类别" prop="mdProjectItem.prodTypeDictName" key="prodTypeDictName" width="100px" show-overflow-tooltip align="center"></el-table-column> -->
    <el-table-column label="研发留样" prop="researchSample" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column label="PO号" prop="poCode" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column label="DI PO#" prop="diPo" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column label="DI Item#" prop="diItem" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column
      label="展示盒编码"
      prop="displayBoxCode"
      show-overflow-tooltip
      width="90px"
      align="center"
    ></el-table-column>
    <el-table-column
      label="是否需测试"
      prop="isNeedTestName"
      key="isNeedTest"
      show-overflow-tooltip
      width="90px"
      align="center"
    ></el-table-column>
    <el-table-column
      label="客户产品编码"
      prop="mdProjectItem.prodCodeCust"
      key="prodCodeCust"
      width="100px"
      show-overflow-tooltip
      align="center"
    ></el-table-column>
    <el-table-column label="HS编码" prop="hsCode" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column
      label="是否商检"
      prop="isCommodityInspectionName"
      key="isCommodityInspection"
      show-overflow-tooltip
      align="center"
    ></el-table-column>
    <el-table-column
      label="客户产品英文名称"
      prop="mdProjectItem.prodNameCustEn"
      width="130px"
      key="prodNameCustEn"
      show-overflow-tooltip
      align="center"
    ></el-table-column>
    <el-table-column label="大货留样" prop="sampleRetention" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column label="计量单位" prop="unitName" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column
      label="报价产品类别"
      prop="quoteCateName"
      key="quoteCate"
      show-overflow-tooltip
      width="100px"
      align="center"
    ></el-table-column>
    <el-table-column
      label="新产品"
      prop="newProdName"
      key="newProd"
      show-overflow-tooltip
      align="center"
    ></el-table-column>
    <el-table-column label="待定项目" prop="indeterminateProject" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column
      label="资讯确认时间"
      prop="confirmTime"
      show-overflow-tooltip
      width="100px"
      align="center"
    ></el-table-column>
    <el-table-column label="是否含PU" prop="isPuName" key="isPu" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column
      label="大货样时间"
      prop="sampleRetentionTime"
      show-overflow-tooltip
      width="90px"
      align="center"
    ></el-table-column>
    <el-table-column
      label="是否含PVC"
      prop="isPvcName"
      key="isPvc"
      show-overflow-tooltip
      width="90px"
      align="center"
    ></el-table-column>
    <el-table-column label="测试时间" prop="testTime" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column
      label="是否含金属"
      prop="isMetalName"
      key="isMetal"
      show-overflow-tooltip
      width="90px"
      align="center"
    ></el-table-column>
    <el-table-column
      label="产品配置描述"
      prop="mdProjectItem.prodDescCn"
      width="100px"
      key="prodDescCn"
      show-overflow-tooltip
      align="center"
    >
      <template slot-scope="scope">
        <el-button
          class="button-icon"
          @mouseenter.native="viewProductDesc(scope.row)"
          v-if="!!scope.row.mdProjectItem.prodDescCn"
          type="text"
        >
          <i class="el-icon-view" title="查看"></i>
        </el-button>
      </template>
    </el-table-column>
    <el-table-column
      label="中包装"
      prop="mdProjectItem.prodPack"
      key="prodPack"
      show-overflow-tooltip
      align="center"
    ></el-table-column>
    <el-table-column
      label="外包装"
      prop="mdProjectItem.outPack"
      key="outPack"
      show-overflow-tooltip
      align="center"
    ></el-table-column>
    <el-table-column
      label="项目主项备注"
      prop="mdProjectItem.remark"
      key="remark"
      show-overflow-tooltip
      width="100px"
      align="center"
    ></el-table-column>
    <el-table-column label="物料代码" prop="matCode" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column
      label="产品名称编码"
      prop="prodNameCode"
      show-overflow-tooltip
      width="100px"
      align="center"
    ></el-table-column>
    <el-table-column label="冻结数量" prop="freezeNum" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column
      label="已出货数量"
      prop="shippedNum"
      show-overflow-tooltip
      width="90px"
      align="center"
    ></el-table-column>
    <el-table-column label="剩余数量" prop="remainNum" show-overflow-tooltip align="center"></el-table-column>
    <!--  <el-table-column label="是否关闭" prop="isCloseName" key="isClose" show-overflow-tooltip align="center"></el-table-column> -->
    <el-table-column
      label="有无资料袋"
      prop="isInfoBagName"
      key="isInfoBag"
      show-overflow-tooltip
      width="90px"
      align="center"
    ></el-table-column>
    <el-table-column
      label="是否返单"
      prop="isReturnOrderName"
      key="isReturnOrder"
      show-overflow-tooltip
      align="center"
    ></el-table-column>
    <el-table-column
      label="是否备案"
      prop="isFilingName"
      key="isFiling"
      show-overflow-tooltip
      align="center"
    ></el-table-column>
    <el-table-column label="备案日期" prop="filingDate" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column label="备案人员" prop="filingUser" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column
      label="shutterstock备案"
      prop="shutterstockFiling"
      show-overflow-tooltip
      width="130px"
      align="center"
    ></el-table-column>
    <el-table-column
      label="设计负责人"
      prop="designPrincipalName"
      key="designPrincipal"
      show-overflow-tooltip
      width="90px"
      align="center"
    ></el-table-column>
    <el-table-column
      label="开发组织"
      prop="developOrgName"
      key="developOrgId"
      show-overflow-tooltip
      align="center"
    ></el-table-column>
    <!-- 新增作业类型 -->
    <!-- <el-table-column label="报价模型" prop="quoteModel" show-overflow-tooltip align="center"></el-table-column> -->
    <el-table-column
      label="不可免抵税的退税差率t"
      prop="ntfTaxRebateRate"
      key="ntfTaxRebateRate"
      show-overflow-tooltip
      width="150px"
      align="center"
    ></el-table-column>
    <el-table-column label="外销单价" prop="exportPrice" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column label="外销总价" prop="exportAmount" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column label="费用名称" prop="feeName" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column label="费用金额" prop="feeAmount" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column
      label="本币报价（模型）"
      prop="localCurrencyQuoteModel"
      show-overflow-tooltip
      width="130px"
      align="center"
    ></el-table-column>
    <el-table-column label="模型加成" prop="additionModel" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column label="模型价" prop="modelPrice" show-overflow-tooltip align="center"></el-table-column>
    <el-table-column label="模型差异" show-overflow-tooltip align="center">
      <template slot-scope="scope">
        <span>{{scope.row.modelDifference}}</span>
        <span v-if="!!scope.row.modelDifference">%</span>
      </template>
    </el-table-column>
    <el-table-column label="制费前毛利率" show-overflow-tooltip width="100px" align="center">
      <template slot-scope="scope">
        <span>{{scope.row.grossProfitMargin}}</span>
        <span v-if="!!scope.row.grossProfitMargin">%</span>
      </template>
    </el-table-column>
    <!-- <el-table-column label="监测报告" prop="testReport" show-overflow-tooltip width="100px" align="center"></el-table-column>
    <el-table-column label="文件" prop="itemFile" show-overflow-tooltip width="100px" align="center"></el-table-column>-->
    <el-table-column label="productImage1" width="100px" show-overflow-tooltip align="center">
      <template slot-scope="scope">
        <img
          :src="getAttachUrl(scope.row.mdProjectItem.productImage1)"
          @click="previewPic(scope.row.mdProjectItem.productImage1)"
          :alt="getAttachName(scope.row.mdProjectItem.productImage1)"
        >
      </template>
    </el-table-column>
    <el-table-column label="productImage2" width="100px" show-overflow-tooltip align="center">
      <template slot-scope="scope">
        <img
          :src="getAttachUrl(scope.row.mdProjectItem.productImage2)"
          @click="previewPic(scope.row.mdProjectItem.productImage2)"
          :alt="getAttachName(scope.row.mdProjectItem.productImage2)"
        >
      </template>
    </el-table-column>
    <el-table-column label="productImage3" width="100px" show-overflow-tooltip align="center">
      <template slot-scope="scope">
        <img
          :src="getAttachUrl(scope.row.mdProjectItem.productImage3)"
          @click="previewPic(scope.row.mdProjectItem.productImage3)"
          :alt="getAttachName(scope.row.mdProjectItem.productImage3)"
        >
      </template>
    </el-table-column>
    <el-table-column
      label="projectItem.productImage4"
      width="100px"
      show-overflow-tooltip
      align="center"
    >
      <template slot-scope="scope">
        <img
          :src="getAttachUrl(scope.row.mdProjectItem.productImage4)"
          @click="previewPic(scope.row.mdProjectItem.productImage4)"
          :alt="getAttachName(scope.row.mdProjectItem.productImage4)"
        >
      </template>
    </el-table-column>
    <el-table-column
      label="projectItem.productImage5"
      width="100px"
      show-overflow-tooltip
      align="center"
    >
      <template slot-scope="scope">
        <img
          :src="getAttachUrl(scope.row.mdProjectItem.productImage5)"
          @click="previewPic(scope.row.mdProjectItem.productImage5)"
          :alt="getAttachName(scope.row.mdProjectItem.productImage5)"
        >
      </template>
    </el-table-column>
    <!-- 产品结构 -->
    <el-table-column label="产品结构" key="productStructure" fixed="right" align="center" width="90px">
      <template slot-scope="scope">
        <el-button type="text" @click="viewProductStructureTable(scope.row, scope.$index)">
          <i class="el-icon-more-outline" title="产品结构"></i>
        </el-button>
      </template>
    </el-table-column>
    <el-table-column fixed="right" label="操作" key="operate" align="center" width="200px">
      <template slot-scope="scope">
        <el-button type="text" class="button-icon" @click="view(scope.row)">
          <i class="el-icon-view" title="查看"></i>
        </el-button>
        <el-button type="text" class="button-icon" @click="edit(scope.row, scope.$index)">
          <i class="el-icon-edit" title="编辑"></i>
        </el-button>
        <el-button type="text" class="button-icon-del" @click="removeRow(scope.row, scope.$index)">
          <i class="el-icon-delete" title="删除"></i>
        </el-button>
        <el-button type="text" @click="addProduct(scope.row, scope.$index)" class="button-icon">
          <i class="el-icon-plus" title="新增子项"></i>
        </el-button>
        <el-button type="text" @click="feedbackView(scope.row)">
          <i class="el-icon-info" title="历史"></i>
        </el-button>
        <el-button type="text" @click="feedbackHsitoryView(scope.row)">
          <i class="el-icon-location" title="对比"></i>
        </el-button>
      </template>
    </el-table-column>
  </el-table>
  <div style="margin-top: 20px">
    <el-button @click="setCurrent(tableData[1])">选中第二行</el-button>
    <el-button @click="setCurrent()">取消选择</el-button>
  </div>
</div>
</template>
<script>

import elTableData from './ElTable.json'
export default {
  name: 'HelloWorld',
  data () {
    return {
      list: elTableData.data.mdOfficialOrderItems,
      // list: [
      //   {
      //     officialOrderItemId: '697d4b5a193a11e9b3d5d0946681f835',
      //     officialOrderId: '0ce0a4b412e311e99de6d0946681f835',
      //     officialOrderItemNo: 'DD190058-001',
      //     officialOrderType: '2',
      //     bizOrgId: '3000',
      //     returnOrderCode: 'YX190042-01',
      //     projectInitialVersion: '2',
      //     researchSample: '2',
      //     poCode: '21439',
      //     category: '4',
      //     isNeedTest: 'N',
      //     isCommodityInspection: 'N',
      //     qty: '18144',
      //     sampleRetention: '8',
      //     unit: 'set',
      //     quoteCate: 'XSPL180054',
      //     newProd: 'Y',
      //     isPu: 'N',
      //     sampleRetentionTime: '2019-03-12',
      //     isPvc: 'N',
      //     isMetal: 'N',
      //     towingTime: '2019-03-18',
      //     matCode: '9.19H0058-001',
      //     prodNameCode: '20190058-001',
      //     freezeNum: '0',
      //     shippedNum: '0',
      //     remainNum: '18144',
      //     isInfoBag: '2',
      //     singleProductLabor: '0.0100',
      //     fobAmount: '0.1240',
      //     amount: '2249.8560',
      //     exportPrice: '0.1240',
      //     exportAmount: '2249.8560',
      //     feeName: '模具费',
      //     feeAmount: '200.00',
      //     localCurrencyQuoteModel: '0.7680',
      //     additionModel: '1.1815',
      //     modelPrice: '0.1107',
      //     modelDifference: '11.98',
      //     grossProfitMargin: '32.23',
      //     actualBizOrgId: '3000',
      //     isReturnOrder: 'N',
      //     isFiling: 'N',
      //     ntfTaxRebateRate: '3',
      //     singleProductMaterial: '0.6400',
      //     status: '1',
      //     crtTime: '2019-01-18 16:22:06',
      //     crtUserId: 'user0006',
      //     crtUserName: '陈林志',
      //     updTime: '2019-01-18 16:22:06',
      //     updUserId: 'user0006',
      //     updUserName: '陈林志',
      //     isActive: '1',
      //     projectItemId: '2c25052515a111e9b559d0946681f835',
      //     itemVersion: 0,
      //     operatingUnit: '2',
      //     filingDate: '2019-01-24',
      //     filingUser: '许双双',
      //     materialAdditionFactor: '1.20',
      //     artificialAdditionFactor: '0',
      //     originalExportAmount: '2249.8560',
      //     originalGrossProfit: '725.12858880',
      //     followUserId: 'user0015',
      //     mdProjectItem: {
      //       projectItemId: '2c25052515a111e9b559d0946681f835',
      //       projectItemNo: 'PJ190301-007',
      //       prodTypeDict: 'XSPL180054',
      //       prodCodeCust: 'DC7536',
      //       prodNameCust: '4x8车贴-怪物物语3（四色）',
      //       prodNameCustEn: 'STRANGER THINGS 3 - 4 COLOR DECAL 4 X 8',
      //       prodDescCn:
      //         '产品（品类）：车贴\r\n单品用量：1\r\n贴纸：\r\n---贴纸规格：101.6X203.2;---贴纸材质：车贴;---车贴：5丝PET 覆光膜以后9丝;---配件：是;---配件描述：车贴：1张，101.6X203.2，5丝PET 覆光膜以后9丝，1c/0c 或4c/0c(具体按文件），按在线返单， 背卡：1张，101.6X203.2，250G白卡，4C/0C， 自封袋：0.043mm的OPP自封袋， 包装：6/中包装，288/外箱;\r\n包装：\r\n---自封袋：是;---自封袋描述：车贴：1张，101.6X203.2，5丝PET 覆光膜以后9丝，1c/0c 或4c/0c(具体按文件），按在线返单， 背卡：1张，101.6X203.2，250G白卡，4C/0C， 自封袋：0.043mm的OPP自封袋， 包装：6/中包装，288/外箱;---------------------------------',
      //       prodPack: '6',
      //       outPack: '288',
      //       status: '1',
      //       currentVersion: '2',
      //       remark: '',
      //       crtTime: '2019-01-11 21:02:05',
      //       crtUserId: 'user0163',
      //       crtUserName: '王灵芳',
      //       updTime: '2019-02-19 08:43:16',
      //       updUserId: 'user0015',
      //       updUserName: '周魏',
      //       isActive: '1',
      //       mdProjectProds: [
      //         {
      //           projectProdId: '2c26151c15a111e9b559d0946681f835',
      //           projectItemId: '2c25052515a111e9b559d0946681f835',
      //           catgId: 'D00034',
      //           projectProdNo: '1901110860',
      //           projectProdJson: '',
      //           projectProdDesc:
      //             '产品（品类）：车贴\n单品用量：1\n贴纸：\n---贴纸规格：101.6X203.2;---贴纸材质：车贴;---车贴：5丝PET 覆光膜以后9丝;---配件：是;---配件描述：车贴：1张，101.6X203.2，5丝PET 覆光膜以后9丝，1c/0c 或4c/0c(具体按文件），按在线返单， 背卡：1张，101.6X203.2，250G白卡，4C/0C， 自封袋：0.043mm的OPP自封袋， 包装：6/中包装，288/外箱;\n包装：\n---自封袋：是;---自封袋描述：车贴：1张，101.6X203.2，5丝PET 覆光膜以后9丝，1c/0c 或4c/0c(具体按文件），按在线返单， 背卡：1张，101.6X203.2，250G白卡，4C/0C， 自封袋：0.043mm的OPP自封袋， 包装：6/中包装，288/外箱;',
      //           crtTime: '2019-01-16 08:16:14',
      //           crtUserId: 'user0163',
      //           crtUserName: '王灵芳',
      //           updTime: '2019-01-16 08:16:14',
      //           updUserId: 'user0163',
      //           updUserName: '王灵芳',
      //           isActive: '1',
      //           templateVersion: 0,
      //           mdCatg: {
      //             catgName: '车贴',
      //             catgCode: 'D00034'
      //           },
      //           projectProdName: '4x8车贴-怪物物语3（四色）',
      //           projectProdNum: '1'
      //         }
      //       ],
      //       prodTypeDictName: '贴纸',
      //       proofOrderItemNo: 'YX190042-01',
      //       officialorderItemNo: 'DD190058-001',
      //       productImage1: [],
      //       productImage2: [],
      //       productImage3: [],
      //       productImage4: [],
      //       productImage5: [],
      //       attachment: [],
      //       mdProjectItemInitial: {
      //         projectItemId: '2c25052515a111e9b559d0946681f835',
      //         projectItemNo: 'PJ190301-007',
      //         prodTypeDict: 'XSPL180054',
      //         prodCodeCust: 'DC7536',
      //         prodNameCust: '4x8车贴-怪物物语3（四色）',
      //         prodNameCustEn: 'STRANGER THINGS 3 - 4 COLOR DECAL 4 X 8',
      //         prodDescCn:
      //           '产品（品类）：车贴\r\n单品用量：1\r\n贴纸：\r\n---贴纸规格：101.6X203.2;---贴纸材质：车贴;---车贴：5丝PET 覆光膜以后9丝;---配件：是;---配件描述：车贴：1张，101.6X203.2，5丝PET 覆光膜以后9丝，1c/0c 或4c/0c(具体按文件），按在线返单， 背卡：1张，101.6X203.2，250G白卡，4C/0C， 自封袋：0.043mm的OPP自封袋， 包装：6/中包装，288/外箱;\r\n包装：\r\n---自封袋：是;---自封袋描述：车贴：1张，101.6X203.2，5丝PET 覆光膜以后9丝，1c/0c 或4c/0c(具体按文件），按在线返单， 背卡：1张，101.6X203.2，250G白卡，4C/0C， 自封袋：0.043mm的OPP自封袋， 包装：6/中包装，288/外箱;---------------------------------',
      //         prodPack: '6',
      //         outPack: '288',
      //         currentVersion: '2',
      //         remark: '',
      //         mdProjectProds: [
      //           {
      //             catgId: 'D00034',
      //             projectProdNo: '1901110860',
      //             projectProdJson: '',
      //             projectProdDesc:
      //               '产品（品类）：车贴\n单品用量：1\n贴纸：\n---贴纸规格：101.6X203.2;---贴纸材质：车贴;---车贴：5丝PET 覆光膜以后9丝;---配件：是;---配件描述：车贴：1张，101.6X203.2，5丝PET 覆光膜以后9丝，1c/0c 或4c/0c(具体按文件），按在线返单， 背卡：1张，101.6X203.2，250G白卡，4C/0C， 自封袋：0.043mm的OPP自封袋， 包装：6/中包装，288/外箱;\n包装：\n---自封袋：是;---自封袋描述：车贴：1张，101.6X203.2，5丝PET 覆光膜以后9丝，1c/0c 或4c/0c(具体按文件），按在线返单， 背卡：1张，101.6X203.2，250G白卡，4C/0C， 自封袋：0.043mm的OPP自封袋， 包装：6/中包装，288/外箱;',
      //             crtTime: '2019-01-16 08:16:14',
      //             crtUserId: 'user0163',
      //             crtUserName: '王灵芳',
      //             updTime: '2019-01-16 08:16:14',
      //             updUserId: 'user0163',
      //             updUserName: '王灵芳',
      //             templateVersion: 0,
      //             mdCatg: {
      //               catgName: '车贴',
      //               catgCode: 'D00034'
      //             },
      //             projectProdName: '4x8车贴-怪物物语3（四色）',
      //             projectProdNum: '1'
      //           }
      //         ],
      //         prodTypeDictName: '贴纸'
      //       }
      //     },
      //     officialOrderTypeName: 'OEM',
      //     bizOrgName: '成品采购中心',
      //     actualBizOrgName: '成品采购中心',
      //     isNeedTestName: '否',
      //     isCommodityInspectionName: '否',
      //     unitName: 'PCS',
      //     newProdName: '是',
      //     isPuName: '否',
      //     isPvcName: '否',
      //     isMetalName: '否',
      //     isInfoBagName: '无',
      //     isReturnOrderName: '否',
      //     isFilingName: '不需要',
      //     operatingUnitName: '外购',
      //     salesCatg: {
      //       baseSalesCatgId: 'XSPL180054',
      //       salesCatgCode: 'XSPL180054',
      //       salesCatgName: '贴纸',
      //       remark: '贴纸',
      //       crtTime: '2018-12-15 22:40:00',
      //       crtUserId: '1',
      //       crtUserName: '系统管理员',
      //       updTime: '2018-12-15 22:40:00',
      //       updUserId: '1',
      //       updUserName: '系统管理员',
      //       isActive: '1',
      //       tenantId: ''
      //     },
      //     categoryName: '儿童益智'
      //   }
      // ],
      currentRow: null
    }
  },
  methods: {
    setCurrent (row) {
      this.$refs.singleTable.setCurrentRow(row)
    },
    handleCurrentChange (val) {
      this.currentRow = val
    },
    handleSelectionChange (val) {
      this.selected = val
    },
    // 从订单选择产品
    chooseProductFromOrder () {
      this.productSelectorFromOrderVisible = true
    },
    getAttachUrl (files) {
      if (!files || !files.length) return
      return files[0].url ? files[0].url : files[0].attachUri
    },
    getAttachName (files) {
      if (!files || !files.length) return
      return files[0].name ? files[0].name : files[0].attachName
    },
    previewPic (files) {
      if (!files || !files.length) return
      const url = files[0].url ? files[0].url : files[0].attachUri
      window.open(url)
    },
    handleSizeChange (val) {
      this.listQuery.limit = val
      this.getList()
    },
    getBizOrgName (val) {
      for (const index in this.executionOrgOptions) {
        if (val === this.executionOrgOptions[index].bizOrgId) {
          this.form.bizOrgName = this.executionOrgOptions[index].bizOrgName
          break
        }
      }
    },
    feedbackView (row) {
      this.sourceItemNo = row.officialOrderItemNo
      this.feedbackViewVisible = true
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1,
h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
